Skip to content

Conversation

@araujogui
Copy link
Member

Fixes #61235

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/sqlite

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. sqlite Issues and PRs related to the SQLite subsystem. labels Jan 8, 2026
@araujogui araujogui force-pushed the sqlite-prepare-options branch 2 times, most recently from b62c50e to 9bca95a Compare January 8, 2026 01:51
@codecov
Copy link

codecov bot commented Jan 8, 2026

Codecov Report

❌ Patch coverage is 84.81013% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.51%. Comparing base (903f647) to head (9418cab).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
src/node_sqlite.cc 84.81% 7 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #61311      +/-   ##
==========================================
- Coverage   88.54%   88.51%   -0.03%     
==========================================
  Files         704      704              
  Lines      208793   208872      +79     
  Branches    40307    40336      +29     
==========================================
+ Hits       184866   184879      +13     
- Misses      15913    15965      +52     
- Partials     8014     8028      +14     
Files with missing lines Coverage Δ
src/node_sqlite.h 80.39% <ø> (ø)
src/node_sqlite.cc 80.32% <84.81%> (+0.15%) ⬆️

... and 32 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Renegade334

This comment was marked as outdated.

@araujogui araujogui force-pushed the sqlite-prepare-options branch from bb33e58 to 6da81dd Compare January 8, 2026 20:30
@araujogui araujogui requested a review from Renegade334 January 8, 2026 20:31
@araujogui araujogui force-pushed the sqlite-prepare-options branch from 45a8e19 to faaec9f Compare January 8, 2026 23:03
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 11, 2026
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 11, 2026
@nodejs-github-bot
Copy link
Collaborator

@Renegade334 Renegade334 added the commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. label Jan 11, 2026
Copy link
Member

@gurgunday gurgunday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Local<Object> options = args[1].As<Object>();

Local<Value> return_arrays_v;
if (!options
Copy link
Member

@ovflowd ovflowd Jan 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ooc, are you eagerly returning if you're unable to allocate a string? (I'm assuming that's what this is doing)

Copy link
Member Author

@araujogui araujogui Jan 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If an API method returns a MaybeLocal<>, the API method can potentially fail either because an exception is thrown, or because an exception is pending, e.g. because a previous API call threw an exception that hasn't been caught yet, or because a TerminateExecution exception was thrown. In that case, an empty MaybeLocal is returned.

https://v8.github.io/api/head/classv8_1_1MaybeLocal.html

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically, when it fails, an exception is already pending, so we return early to let it propagate.

@araujogui araujogui force-pushed the sqlite-prepare-options branch from faaec9f to 9418cab Compare January 14, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. needs-ci PRs that need a full CI run. sqlite Issues and PRs related to the SQLite subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sqlite: db.prepare(sql, options)

6 participants